package com.eliza.library.device.nfc

import android.app.Activity
import android.app.PendingIntent
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.hardware.usb.UsbAccessory
import android.hardware.usb.UsbManager
import android.nfc.NfcAdapter
import android.os.Build
import android.util.Log
import androidx.annotation.RequiresApi


class NFCTools(val context: Context) {
    val adapter: NfcAdapter = NfcAdapter.getDefaultAdapter(context)

    fun isSupport(): Boolean {
        return adapter != null
    }

    fun isEnabled(): Boolean {
        return adapter.isEnabled
    }

    fun start(activity: Activity, intent: PendingIntent) {
//        adapter.enableForegroundDispatch(activity,intent,null,0)
    }

}
